package com.java.io.character_stream;

import java.io.*;

/**
 * 字符打印流PrintWriter
 */
public class PrintStreamDemo {

    public void printOut() throws IOException {
        BufferedReader bufr = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter( new FileWriter("a.txt"), true);
        String line = null;
        while ((line = bufr.readLine()) != null) {
            if ("over".equals(line))
                break;
            out.println(line.toUpperCase());
            //out.flush();
        }
        out.close();
        bufr.close();
    }


}
